import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './styles/base.css'
import './styles/common.css'
// import './styles/index.css'

import BaseGood from './components/BaseGood.vue'
import zhuti from './components/zhuti.vue'
import HelloWorld from './components/HelloWorld.vue'
import axios from 'axios'
import Aat from './xss/Aat.vue'
// import { Form } from 'vant';
// import { Field } from 'vant';

// Vue.use(Form);
// Vue.use(Field);
import Vant from 'vant';
import 'vant/lib/index.css';
import ArticleItem from '@/components/ArticleItem.vue'
Vue.component('ArticleItem', ArticleItem)
Vue.use(Vant);
Vue.config.productionTip = false
Vue.component('BaseGood', BaseGood)
Vue.component('HelloWorld', HelloWorld)
Vue.component('Aat', Aat)
// Vue.directive(指令名,对象)
Vue.directive('aa', {
  // 'inserted'(dom元素,传的值){}
  'inserted' (el, bin) {
    console.log(el, bin.value, 'aaaa');
    el.focus()
  }
})
//全局注册自定义指令
Vue.directive('zs', {
  'inserted' (el, bb) {
    console.log(el, bb, 111111);//el是dom元素，bb是传的值
    el.focus()//自动获得焦点
  }
})
Vue.prototype.$Bu = new Vue()//main.js中把$buss挂载进Vue实例

Vue.component('zhuti', zhuti)
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
